import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../pages/Home'
import About from '../pages/About'
import PageNotFound from '../pages/PageNotFound'
Vue.use(VueRouter)

const router = new VueRouter({
    // 配置路由表
    routes: [
        {
            path: '/home',
            component: Home
        },
        {
            path: '/About',
            component: About
        },
        {
            path: '/',
            // 路由重定向 配置默认页
            redirect: '/home'
        },
        {
            // 配置404页面
            path: '*',
            component: PageNotFound
        }
    ]
})

export default router